home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / mui / MCC_TearOff.lha / MCC_TearOff / Developer / AutoDocs / MCC_TearOffPanel.doc < prev   
Text File  |  1999-01-10  |  7KB  |  202 lines

  1. TABLE OF CONTENTS
  2.  
  3. TearOffPanel.mcc/TearOffPanel.mcc
  4. TearOffPanel.mcc/COMPATIBILITY
  5. TearOffPanel.mcc/MUIA_TearOffPanel_Contents
  6. TearOffPanel.mcc/MUIA_TearOffPanel_Horiz
  7. TearOffPanel.mcc/MUIA_TearOffPanel_State
  8. TearOffPanel.mcc/TearOffPanel.mcc
  9.  
  10. This class is a movable MUI group. Group can be dragged with mouse
  11. and even torn off its parent, becoming a separate window.
  12. This kind of user interface elements are recently very popular
  13. in Windoze world, so I wanted to have something like that in MUI.
  14.  
  15. Panel class can work in cooperation with TearOffBay class.  The Bay
  16. allows to move the panel inside the window (see TearOffBay docs).
  17. You can also use the Panels alone, but this is not so comfortable.
  18.  
  19. Additional windows created by the Panels get their Window_ID's from
  20. the panel's ObjectID. Set it to non-zero if you want the window
  21. positions to be saved.
  22.  
  23. NEW in v13:
  24.  - mcp module for configuration
  25.  - support for horizontal and vertical panels
  26.  - panels can be moved between bays
  27.  - panels have labels for easy identification
  28.  - you can show/hide any panel from the bay's context menu
  29.  - uses CompactWindow.mcc
  30.  
  31. still missing:
  32.  - localization
  33.  - something more?
  34.  
  35. TearOff classes are Polymorphware. That means, if you use it in your program,
  36. you have to pay/send me what you expect from your users, eg. if it is
  37. 'Chocolateware' you should send me a bar of chocolate. Freeware programs
  38. can use TearOff for free, of course.
  39.  
  40.  
  41. Szymon Ulatowski, szulat@friko6.onet.pl
  42.  
  43.  support site: 
  44. http://friko6.onet.pl/rz/szulat/tearoff/
  45.  
  46. TearOffPanel.mcc/COMPATIBILITY
  47.  
  48. TearOff classes use some undocumented features of MUI and muigfx.library.
  49.  
  50. This can give one of 2 effects:
  51.  
  52.  - the author of MUI will come to the conclusion that developers need
  53.    those features and will officially reveal and document it (hahaha)
  54.    (can you believe that frame selection gadget and frame drawing routine
  55.    are 'secret'? in graphics user interface system?)
  56.  - there will be a new version of MUI (hahahahaha!!!!!) and TearOff will
  57.    not work with it
  58.  
  59. As you can see, both possibilities are a science fiction.
  60.  
  61. Anyway, if you are afraid of the second one, you can sleep well. 
  62. TearOff checks each time if the MUI version is 'safe' and will disable
  63. 'tricks' when it is too new (in 'notricks' mode, panels are drawn
  64. using plain frame and no images :-( ). Of course the new TearOff
  65. will consider the new MUI safe again.
  66.  
  67. But if you are brave, you can check if the new version is also safe.
  68. Set the env. variable:
  69. setenv tearoffsafemui 20   (if the new mui version is 20)
  70. and test the tearoff panels. If they work ok, you can make the setting
  71. permanent: copy env:tearoffmuisafe envarc:
  72.  
  73. TearOffPanel.mcc/MUIA_TearOffPanel_Bay
  74.  
  75.     NAME
  76.     MUIA_TearOffPanel_Bay -- [..G], Object *
  77.  
  78.     FUNCTION
  79.    You can get the parent bay for your panel here.
  80.    Not really useful for application designers.
  81. TearOffPanel.mcc/MUIA_TearOffPanel_Contents
  82.  
  83.     NAME
  84.     MUIA_TearOffPanel_Contents -- [I.G], Object *
  85.  
  86.     FUNCTION
  87.    Any object, that will be inside the panel.
  88.  
  89.  
  90.     NOTE
  91.    If you want to create a comfortable GUI and take advantage of
  92.    TearOff features you make your panel object flexible ie. don't
  93.    define fixed sizes.
  94.  
  95.     BUGS
  96.    This is TearOffBay problem, but you should know, that
  97.    placing too many wide horizontal panels (i.e. big _minwidth)
  98.    in the bay can be dangerous if the user arranged them horizontally.
  99.    The same applies to vertical panels with big _minheight.
  100.  
  101.     SEE ALSO
  102.     TearOffBay.mcc/TearOffBay.mcc, MUIA_TearOffPanel_Horiz
  103.     
  104. TearOffPanel.mcc/MUIA_TearOffPanel_CanFlipShape
  105.  
  106.     NAME
  107.     MUIA_TearOffPanel_CanFlipShape -- [ISG], BOOL
  108.  
  109.     FUNCTION
  110.    If your panel can work in both horizontal in vertical layout,
  111.    you can enable this tag.
  112.    In that case the user will be able to drag your panel into another
  113.    bay, even if it has another layout.
  114.    
  115.    Default value is FALSE, that means the panel can be used in
  116.    only one type of bays.
  117.    
  118.     NOTE
  119.    You will probably want to change something in your panel
  120.    before it goes into alien-shaped bay. You can use notification
  121.    for that purpose. eg.
  122.  
  123.    DoMethod(panel,MUIM_Notify,MUIA_TearOffPanel_Horiz,MUIV_EveryTime,
  124.       slider,3,MUIM_Set,MUIA_Slider_Horiz,MUIV_TriggerValue);
  125.  
  126.    Unfortunately there are not many classes that can change the
  127.    layout in runtime.
  128.    According to MUI docs, only the slider objects have Horiz 
  129.    attribute settable.
  130.    Experiments have proved that also the group class is able to
  131.    accept the change. (despite of MUIA_Group_Horiz [I..] in docs!)
  132.    One more object that could change the could be the text object
  133.    (and the buttons). We could do:
  134.  
  135.    DoMethod(panel,MUIM_Notify,MUIA_TearOffPanel_Horiz,TRUE,
  136.       text,3,MUIM_Set,MUIA_TextContents,"Text");
  137.    DoMethod(panel,MUIM_Notify,MUIA_TearOffPanel_Horiz,FALSE,
  138.       text,3,MUIM_Set,MUIA_TextContents,"T\ne\nx\nt");
  139.  
  140.    ...but this is not very good, because exisiting text class 
  141.    has no SetVMin attribute and long string will give very tall
  142.    and unsizable objects.
  143.    A text class with Horiz/Vert switch would be really useful!
  144.    
  145.     SEE ALSO
  146.     TearOffBay.mcc/MUIA_TearOffBay_Horiz, MUIA_TearOffPanel_Horiz,
  147.     TearOffBay.mcc/MUIA_TearOffBay_LinkedBay
  148.  
  149. TearOffPanel.mcc/MUIA_TearOffPanel_Horiz
  150.  
  151.     NAME
  152.     MUIA_TearOffPanel_Horiz -- [ISG], BOOL
  153.  
  154.     FUNCTION
  155.    Since V13 TearOff classes suport both horizontal and vertical
  156.    layout for panels and bays.
  157.    In most cases you should not add vertical panels to the
  158.    horizontal bays (and vice versa).
  159.  
  160.     SEE ALSO
  161.     TearOffBay.mcc/MUIA_TearOffBay_Horiz, MUIA_TearOffPanel_CanFlipShape
  162.    
  163. TearOffPanel.mcc/MUIA_TearOffPanel_Label
  164.  
  165.     NAME
  166.     MUIA_TearOffPanel_Label -- [ISG], char*
  167.  
  168.     FUNCTION
  169.    Panel's label will be displayed in the context menus, window
  170.    titlebar and as icon label for hidden panels.
  171.    You should always use this attribute.
  172.  
  173. TearOffPanel.mcc/MUIA_TearOffPanel_WindowTags
  174.  
  175.     NAME
  176.     MUIA_TearOffPanel_WindowTags -- [ISG], APTR
  177.  
  178.     FUNCTION
  179.    You can specify additional tags that will be passed
  180.    to the window when your panel is switched to the 'TornOff' mode.
  181.    
  182.     NOTE
  183.    Remember, the window is a CompactWindow not the usual MUI Window!
  184.  
  185.     SEE ALSO
  186.    MUIA_TearOffPanel_State, CompactWindow.mcc/CompactWindow.mcc
  187. TearOffPanel.mcc/MUIA_TearOffPanel_State
  188.  
  189.     NAME
  190.     MUIA_TearOffPanel_State -- [ISG], long
  191.  
  192.     FUNCTION
  193.    You can change the panel's state, but why? Let the user do it.
  194.    Maybe it is useful for notification.
  195.  
  196.     SPECIAL VALUES
  197.    MUIV_TearOffPanel_State_Fixed   - panel is inside the window
  198.    MUIV_TearOffPanel_State_Hidden  - well...
  199.    MUIV_TearOffPanel_State_Torn    - outside the window
  200.    MUIV_TearOffPanel_State_Cycle   - set only, switch to the next state
  201.  
  202.